git(Auto

您所在的位置:网站首页 misc feature settings git(Auto

git(Auto

2023-04-17 20:26| 来源: 网络整理| 查看: 265

1.git pull  更新代码,发现

error: Your local changes to the following files would be overwritten by merge:pom.xml

Please commit your changes or stash them before you merge. 这说明你的pom.xml与远程有冲突,你需要先提交本地的修改然后更新。

2.git add pom.xml   git commit -m '冲突解决'    提交本地的pom.xml文件,不进行推送远程

3.git pull   更新代码

Auto-merging pom.xml CONFLICT (content): Merge conflict in pom.xml Automatic merge failed; fix conflicts and then commit the result.

更新后你的本地分支上会出现 (develop|MERGING)类似这种标志

4.找到你本地的pom.xml文件,并打开

你会在文件中发现> ae9a0f6b7e42fda2ce9b14a21a7a03cfc5344d61

这种标记,>中间的是其他人修改的代码

自己确定保留那一部分代码,最后删除>这种标志

5.git add pom.xml    git commit -m '冲突解决结束'   再次将本地的pom.xml文件提交

6.git push   将解决冲突后的文件推送到远程



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3